<template>
<div class='page'>
  <div class='nav'>
    <div class="input_div flex_ac" @click="$back() ">
      <van-icon class="ml6" name="arrow-left" size="26" color="#000"/>
      <div class="nav_title">尽调报告</div>
    </div>
	</div>
  <div class="h40"></div>
  <div class="box_div"  ref="gun">
    <van-list
      v-model="isLoad"
      :finished="isfinish"
      finished-text="没有更多了"
      @load="getMore">
      <div class="item_div flex" v-for="i,k in 10" :key="k" @click="toDetail(i.id)">
        <div class="img_div mr15">
          <img class="i_img" src="~@/assets/img/my/jd_img.png" alt="">
        </div>
        <div class="r_div w-90">
          <div class="r1 mb8">上海市制造设备空压机有限公司报告</div>
          <div class="r2 mb8">快速了解产业基本信用情况</div>
          <div class="r3">可以免费下载产业报告</div>
          <div class="r4 flex_ac">
            查看样本
            <van-icon name="arrow" size="16" color="#FA8A26" />
          </div>
          <div class="r5">立即预览</div>
        </div>
      </div>
    </van-list>
  </div>
</div>
</template>
<script>
// import {  } from '@/api/api.js'
export default {
  components: {
  },
  data() {
    return {
      total: 0,
      page: 1,
      isfinish: false,
      isLoad: true,
      list:[]
    }
  },
  created() {
    this.isLoad = false
    this.isfinish = true
    // this.init()
  },
  methods: {
    changeInit(query) {
      this.query = query
      this.init()
    },
    init() {
      this.page = 1
      this.isfinish = false
      this.isLoad = true
      this.list = []
      this.getList()
    },
    getMore() {
      if (this.isfinish||this.list.length==0) {
        return
      }
      this.page++
      this.getList()
    },
    getList() {
      let data = {
        page: this.page,
        type_ids:'119',
        ...this.query
      }
      news.getList({...data}).then(res => {
        this.isLoad = false
        this.list.push(...res.data.data)
        this.total = res.data.total
        if (this.list.length >= this.total) {
          this.isfinish = true
        }
      })
    },
    toDetail(id) {
      this.$router.push({name: 'huiyiDetail', query: {id}})
    }
  }
}
</script>
<style lang="scss" scoped>
.nav{
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	background-color: rgba($color: #fff, $alpha: 1);
	z-index: 10;
	transition: all 0.5s;
}
.input_div{
	width: 100%;
  height: 40px;
	.nav_title{
		font-weight: 500;
		font-size: 18px;
		color: #000;
	}
}

.page{
	height:100%;
	width:100%;
	background: #F4F4F4;;
  .total{
    margin-left: 10px;
    font-size: 10px;
    color: #333333;
  }
}
.box_div{
  // margin: 0 10px 10px;
  // padding: 10px;
  // background: #FFFFFF;
  // box-shadow: 0px 3px 9px 2px rgba(250,135,30,0.13);
  // border-radius: 4px 4px 4px 4px;
  height: calc(100% - 40px);
  overflow: auto;
  .item_div{
    background: #FFFFFF;
    box-shadow: 0px 3px 9px 2px rgba(68,142,238,0.13);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
    margin: 10px 5px;
    padding: 20px 10px;
    .item_title{
      font-size: 15px;
      color: #000000;
      margin: 0px 0px 5px 0px;
    }
    .item_desc{
      font-size: 13px;
      color: #000000;
      line-height: 23px;
      margin: 0px 0px 6px 0px;
    }
    .small{
      font-size: 12px;
      color: #666666;
    }
    .s1{
      font-size: 13px;
      color: #138AF2;
    }
  }
}
.img_div{
  position: relative;
  .i_text{
    position: absolute;
    right: 0;
    bottom: 0;
    height: 19px;
    line-height: 19px;
    background: #FA8A26dd;
    border-radius: 5px 0px 3px 0px;
    padding: 0 7px;
    font-size: 11px;
    color: #FFFFFF;
  }
}
.i_img{
  display: inline-block;
  width: 76px;
  height: 110px;
  box-shadow: 0px 3px 6px 0px rgba(19,138,242,0.1), 0px -3px 6px 0px rgba(19,138,242,0.1);
  border-radius: 3px;
  border: 1px solid #DEF0FF;
}
.i_icon{
  width: 10px;
  height: 10px;
}
.r_div{
  position: relative;
}
.r1{
  font-weight: bold;
  font-size: 14px;
  color: #000000;
}
.r2{
  font-size: 12px;
  color: #999999; 
}
.r3{
  font-size: 12px;
  color: #138AF2;
}
.r4{
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 13px;
  color: #FA8A26;
}
.r5{
  position: absolute;
  right: 0;
  bottom: 0;
  width: 65px;
  text-align: center;
  height: 30px;
  line-height: 30px;
  background: #FA8A26;
  border-radius: 3px;
  font-size: 13px;
color: #FFFFFF;
}
</style>